libs/guest: introduce xc_cpu_policy_t
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 16 Mar 2021 15:39:00 +0000 (16:39 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 29 Apr 2021 18:27:21 +0000 (19:27 +0100)
commit989ec5bd1d790ef53db2cf0f12244d10b07bfa3a
tree941449a7f551892177e8f5042308b681c7216291
parent537ae417853233a103b761adfd5d191794018f0a
libs/guest: introduce xc_cpu_policy_t

Introduce an opaque type that is used to store the CPUID and MSRs
policies of a domain. Such type uses the existing {cpuid,msr}_policy
structures to store the data, but doesn't expose the type to the users
of the xenguest library. There are also two arrays to allow for easier
serialization without requiring an allocation each time.

Introduce an allocation (init) and freeing function (destroy) to
manage the type.

Note the type is not yet used anywhere.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/include/xenctrl.h
tools/libs/guest/xg_cpuid_x86.c